how to detect color in python